package com.xujiakai.nacos9001.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author: XJK
 */
@Controller
@RequestMapping("/a1")
public class MyController {

    @Value("${server.port}")
    private String port;

    @RequestMapping(value = "/get",method = RequestMethod.GET)
    @ResponseBody
    public String get(){
        return "hello,nacos. myPort is"+port;
    }

}
